package cn.tedu.spring.config;

import cn.tedu.spring.file.DataBase;
import cn.tedu.spring.resource.WeiboMapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestSpringConfig {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.spring.config");

        DataBase dataBase = context.getBean(DataBase.class);
        System.out.println(dataBase);

        WeiboMapper weiboMapper = context.getBean(WeiboMapper.class);
        System.out.println(weiboMapper);
    }
}
